package models

type Enrollment struct {
	ID                        int         `json:"id" gorm:"column:id;"`
	UserID                    int         `json:"user_id" gorm:"column:user_id;"`
	CourseID                  int         `json:"course_id" gorm:"column:course_id;" validate:"required,gte=1"`
	Status                    AuditStatus `json:"status" gorm:"column:status;"`
	IsAuditApprovedSubscribed int         `json:"-" gorm:"column:is_audit_approved_subscribed;" validate:"-"`
	IsCourseStartSubscribed   int         `json:"-" gorm:"column:is_course_start_subscribed;" validate:"-"`

	CreatedAt JSONTime `json:"created_at" gorm:"column:created_at;->;"`
}

type EnrollmentRecord struct {
	Enrollment
	User User `json:"user" gorm:"foreignKey:UserID;" validate:"-"`
}
